package com.base.monitor.admin.controller.biz.collect;

import com.base.monitor.framework.annotation.RefuseResponseResult;
import com.base.monitor.framework.annotation.ResponseResult;
import com.base.monitor.framework.result.PageResult;
import com.base.monitor.model.model.biz.collect.entity.CollectData;
import com.base.monitor.module.biz.service.collect.CollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/col/collect")
@ResponseResult
public class CollectController {

    @Autowired
    private CollectService collectService;

    /**
     * 获取最新的50条采集数据
     */
    @GetMapping("/getLatestCollectData")
    @RefuseResponseResult
    public PageResult<Map<String, Object>> page() {
        return collectService.page();
    }
}
